Skip to content

Add coverage reporting and expand ERCOT tests#1

Merged
kvkenyon merged 6 commits into
mainfrom
coverage-reporting
Dec 28, 2025
Merged

Add coverage reporting and expand ERCOT tests#1
kvkenyon merged 6 commits into
mainfrom
coverage-reporting

Conversation

@kvkenyon
Copy link
Copy Markdown
Owner

@kvkenyon kvkenyon commented Dec 28, 2025

Raise repo coverage above 90% by adding focused ERCOT client, historical archive, timezone, and date utility tests and ensure coverage.xml is generated. Update CI and docs to publish coverage to Codecov and reflect the workflow badge.


Note

Adds coverage reporting and substantial test expansion, plus dev ergonomics.

  • CI/Coverage: Upload coverage to Codecov in ci.yml; just test-coverage now emits coverage.xml with --cov-report=xml --cov-report=term-missing
  • Pre-commit: New .pre-commit-config.yaml (ruff, ruff-format, pyright) and just targets hooks-install/hooks-run; pre-commit added to dev deps
  • Tests: Large ERCOT suite covering auth (sync/async token flow, caching, errors), constants/enums, date parsing/decorators (chunking, kwargs, errors), timezone utilities (DST handling), endpoint wrappers, helpers (client setup, filtering, error wrapping), historical archive (link discovery, zip parsing, parallel downloads, failures), and base client timeout handling
  • Code tweaks: Improve utils/tz.py DST flag normalization and ambiguous localization robustness
  • Docs: Add Codecov badge and update development/commands and pre-commit section in README.md

Written by Cursor Bugbot for commit 528e1e1. This will update automatically on new commits. Configure here.

Raise repo coverage above 90% by adding focused ERCOT client, historical archive, timezone, and date utility tests and ensure coverage.xml is generated. Update CI and docs to publish coverage to Codecov and reflect the workflow badge.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread tests/test_tz.py Outdated
@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

- Introduced `hooks-install` to set up pre-commit hooks after cloning.
- Added `hooks-run` to manually execute pre-commit hooks on all files.
- Updated README to include instructions for using pre-commit hooks and their benefits.
- Added `pre-commit` as a development dependency in `pyproject.toml`.
- Changed pyright hook to a local configuration using `uv run`.
- Added new dependencies in `uv.lock` for `cfgv`, `distlib`, `filelock`, `identify`, `pre-commit`, and `virtualenv`.
- Cleaned up import statements in test files for consistency and clarity.
- Updated pre-commit hooks to use local configurations for ruff and ruff-format.
- Cleaned up import statements in `conftest.py` and `test_ercot_helpers.py` for consistency.
- Rearranged imports in `ercot.py` for better organization.
@kvkenyon kvkenyon merged commit 45d09a3 into main Dec 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants